<%@ page import="com.hakgc.rent.constant.SystemConstant" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <base href="<%=request.getContextPath()%>/" >
    <title>租房系统</title>
    <style>
      *{
        padding: 0;
        margin: 0;
      }
      header{
        height: 200px;
      }
      header h1{
        font-size: 25px;
        line-height: 50px;
      }

      section:after{
        content: ".";
        display: block;
        height: 0;
        overflow: hidden;
        clear: both;
      }

      section>aside,section>.main{
        float: left;
      }

      section>aside{
        width: 20%;
      }

      section>.main{
        width: 80%;
      }
    </style>
  </head>
  <body>
    <header>
      <h1>租房管理系统
        <c:if test="${!empty sessionScope.currentUser}">
          <small>欢迎您，${sessionScope.currentUser.name}
            <a href="${pageContext.request.contextPath}/loginOut">注销</a>
          </small>
        </c:if>
        <c:if test="${!empty sessionScope.currentUser.logoUrl}">
          <img src="${pageContext.request.contextPath}${sessionScope.currentUser.logoUrl}" width="100">
        </c:if>
      </h1>
      <h2>
        在线人数 <%=SystemConstant.ON_LINE_USER %>
      </h2>
    </header>
  <section>
    <aside>
      <nav>
        <ul>
          <li><a href="rent/districts" target="main-iframe">区县列表</a></li>
          <li><a href="rent/district.jsp" target="main-iframe">新增区县</a></li>
        </ul>
      </nav>
    </aside>
    <div class="main">
      <iframe name="main-iframe" src="main.jsp" frameborder="0" width="100%" height="600"></iframe>
    </div>
  </section>
  </body>
</html>
